import type { App } from 'vue';
import { authDirective } from '/@/directive/authDirective';
import { wavesDirective } from '/@/directive/customDirective';
import { resizeDirective } from '/@/directive/resizeDirective';

/**
 * 导出指令方法：v-xxx
 * @methods authDirective 用户权限指令，用法：v-auth
 * @methods wavesDirective 按钮波浪指令，用法：v-waves
 */
export function directive(app: App) {
	// 用户权限指令
	authDirective(app);
	// 按钮波浪指令
	wavesDirective(app);
	// 元素尺寸变化指令
	resizeDirective(app);
	// focus
	app.directive('focus', {
		mounted(el) {
			el.focus();
		},
	});
}
